package top.italks.demo.service;

import top.italks.demo.entity.HREntity;
import top.italks.demo.entity.OrderEntity;

import java.math.BigDecimal;

/**
 * @author 王少辉
 * @description 订单
 * @date 2019/9/7 14:59
 */
public interface OrderService {
    /**
     * 创建订单
     *
     * @param hr
     * @param amount
     * @param purchaseDays
     * @param purchaseNumber
     * @return
     */
    OrderEntity createOrder(HREntity hr, BigDecimal amount, Integer purchaseDays, Integer purchaseNumber);

    /**
     * 订单支付完成
     *
     * @param outTradeNo
     * @return
     */
    int confirmOrder(String outTradeNo);

    /**
     * 查询订单状态
     *
     * @param orderId
     * @return
     */
    int checkOrderStatus(String orderId);
}
